package orthoplanner.com.google.code.eventhandlers;

import javax.swing.JSlider;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import orthoplanner.com.google.code.ui.ImageViewer;


public class ImageScaleSliderHandler implements ChangeListener {
	private ImageViewer imgViewer;

	public ImageScaleSliderHandler(ImageViewer imgViewer) {
		this.imgViewer = imgViewer;
	}

	public void stateChanged(ChangeEvent e) {
		JSlider source = (JSlider) e.getSource();
		imgViewer.setImageScale(source.getValue());

	}

}
